﻿#Region "Imports Directive"

Imports System

#End Region

Namespace C4F.DevKit.Bluetooth

    Namespace FileTransferProfile

        ''' <summary>
        ''' EventArgs class to be used when a GetFile operation 
        ''' completes.
        ''' </summary>
        Public Class GetFileCompletedEventArgs
            Inherits ComponentModel.AsyncCompletedEventArgs

#Region "Private Members"

            ''' <summary>
            ''' The location of the file that is being pulled.
            ''' </summary>
            Private remFilePath As String

            ''' <summary>
            ''' The content of the file that is being pulled.
            ''' </summary>
            Private remFileContent As Byte()

#End Region

#Region "Public Properties"

            ''' <summary>
            ''' Gets the location of the file that is being pulled.
            ''' </summary>
            Public ReadOnly Property RemoteFilePath() As String

                Get
                    Return Me.remFilePath
                End Get

            End Property
            ''' <summary>
            ''' Gets the content of the file that is being pulled.
            ''' </summary>
            Public ReadOnly Property FileContent() As Byte()

                Get
                    Return Me.remFileContent
                End Get

            End Property

#End Region

#Region "Constructor"

            ''' <summary>
            ''' Initializes the GetFileCompletedEventArgs object.
            ''' </summary>
            ''' <param name="remoteFilePath">The location of the file that was
            ''' pulled.</param>
            ''' <param name="fileContent">The content of the file that was 
            ''' pulled.</param>
            ''' <param name="error">An error that occurred during the 
            ''' asynchronous operation.</param>
            ''' <param name="cancelled">A value indicating whether the 
            ''' asynchronous operation was cancelled.</param>
            ''' <param name="userState">The user-supplied state object supplied
            ''' when the asynchronous operation was requested.</param>
            Public Sub New(ByVal remoteFilePath As String, ByVal fileContent As Byte(), _
                           ByVal [error] As Exception, ByVal cancelled As Boolean, ByVal userState As Object)

                MyBase.New([error], cancelled, userState)
                Me.remFilePath = remoteFilePath
                Me.remFileContent = fileContent

            End Sub

#End Region

        End Class
    End Namespace
End Namespace
